_require local "../../../../basis.smi"

_require local "../../../extensions/usererror/main/UserErrorUtils.smi"
_require local "./ElaborateError.ppg.smi"
_require local "./ElaborateInterface.smi"
_require local "./ElaborateModule.smi"
_require local "./UserTvarScope.smi"

_require "../../../data/symbols/main/Symbol.smi"
_require "../../../data/symbols/main/Loc.smi"
_require "../../../compilerIRs/absyn/main/AbsynInterface.ppg.smi"
_require "../../../compilerIRs/absyn/main/Fixity.smi"
_require "../../../compilerIRs/patterncalc/main/PatternCalcInterface.ppg.smi"
_require "../../../extensions/usererror/main/UserError.ppg.smi"

structure Elaborator =
struct
  type fixEnv = (Fixity.fixity * Loc.loc) SymbolEnv.map
  val extendFixEnv : fixEnv * fixEnv -> fixEnv
  val elaborate :
      fixEnv
      -> AbsynInterface.compile_unit
      -> fixEnv * PatternCalcInterface.compile_unit * UserError.errorInfo list

  val elaborateInterface :
      fixEnv
      -> AbsynInterface.interface_unit
      -> fixEnv
         * PatternCalcInterface.interface_unit
         * UserError.errorInfo list

end
